use actix_web::{App, HttpServer};
use crate::web::handlers::{echo, hello, test1};

pub mod handlers;

pub async fn start_web() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new()
            .service(hello)
            .service(echo)
            .service(test1)
    })
        .bind(("0.0.0.0", 8080))?
        .run()
        .await
}
